#!/usr/bin/python
# coding: utf-8

import web

from app.skate import skate
from app.blog import blog

mapping = (
        "/", skate.app_skate,
        "/blog", blog.app_blog,
        )

web.config.debug = False

def internalerror():
    return web.internalerror("Server internal error, ~_~!!!")

app = web.subdir_application(mapping)

app.notfound = skate.notfound
app.internalerror = internalerror

if __name__ == '__main__':
#     web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr)
    app.run()
